package kummer.wu;

import java.util.Calendar;


public class Config {
	public static final int [] ts = {1,2,5,15,40,50,150,300,999999};
	public static final int INVALID_WORD_ID = 999999;
	public static int startTime = 0;
	public static void advanceDay()
	{
		startTime+=(3600*24);
	}
	public static int getCurrentSec()
	{
		Calendar now = Calendar.getInstance();
		return (int)(now.getTimeInMillis()/1000)+startTime;
	}
	public static int getTomorrowBegin()
	{
		Calendar tomorrow = Calendar.getInstance();
		long ms = tomorrow.getTimeInMillis();
		ms+=(3600*24*1000);
		tomorrow.setTimeInMillis(ms);
		tomorrow.set(Calendar.HOUR_OF_DAY, 0);
		tomorrow.set(Calendar.MINUTE, 0);
		tomorrow.set(Calendar.SECOND, 0);
		return (int)(tomorrow.getTimeInMillis()/1000)+startTime;
	}
	public static int getTodayBegin()
	{
		Calendar today = Calendar.getInstance();
		today.set(Calendar.HOUR_OF_DAY, 0);
		today.set(Calendar.MINUTE, 0);
		today.set(Calendar.SECOND, 0);
		return (int)(today.getTimeInMillis()/1000)+startTime;
	}
	
	public static void trace(Class c,String s)
	{
		//System.out.println(s);
	}
	
	
}
